#include<bits/stdc++.h>
using namespace std;
int n,C;

typedef struct Food{
    int price;
    int weight;
    double cost;//性价比
} Food;
bool cmp(Food a,Food b){
    return a.cost>b.cost;//按性价比 升序排序
}
int main()
{
   // freopen("data.txt","r",stdin);
	cin>>n>>C; 
    vector<Food> foods;
    for(int i=0;i<n;i++){
        int p,w;
        cin>>p>>w;
        double c = (1.0)*p/w;
        Food f; f.cost = c;f.price  = p;f.weight = w;
        foods.push_back(f);
    }

    sort(foods.begin(),foods.end(),cmp);
    double res= 0;
    for(int i=0;i<n;i++){ //每次都消费最高性价比的食物
        if (C-foods[i].weight>=0){
            //可以全吃完
            res += foods[i].price;
            C -= foods[i].weight;
        }else{
            //这次需要部分消费
            res+= (1.0*foods[i].price/foods[i].weight)*C;
            break;
        }
    }

    printf("%.3f",res);   

    



	return 0;
}

